package com.google.codejam.core.test;

/**
 * Interface that defines some method signatures related to solving a problem
 * and getting the result.
 */
public interface ISolvable
{
	/**
	 * Does the necessary processing to solve the problem and prepare the result.
	 * Note that most (if not all) of the 'heavy lifting' should be done in this
	 * method.
	 */
	public void solve();

	/**
	 * Returns the result prepared by the <code>solve</code> method. This method
	 * should be called after the <code>solve</code> method.<p>Note that this
	 * method's main function should be to return the result and not perform
	 * complex or time consuming processing.</p>
	 *
	 * @return A <code>String</code> representation of the result, as calculated by
	 *         the solve method. Can potentially return a <code>null</code> value
	 *         if called before the <code>solve</code> method and depending on the
	 *         implementation.
	 */
	public String getResultString();
}
